package com.wanxi.chat.mongo.api;


import com.wanxi.chat.mongo.api.fallback.MongoFallBack;
import com.wanxi.chat.result.CommonResult;
import com.wanxi.chat.vo.ChatQueryVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "mongodb-server",fallback = MongoFallBack.class)
public interface MongoFeignClient {

    @PostMapping("/add")
    CommonResult mongoAddFeign(@RequestBody ChatQueryVO chatQueryVO);

    @PostMapping("/update")
    CommonResult mongoUpdateFeign(@RequestBody ChatQueryVO chatQueryVO);

    @PostMapping("/delete")
    CommonResult mongoDeleteFeign(@RequestBody ChatQueryVO chatQueryVO);

    @GetMapping("/findmessage")
    CommonResult mongoFindFeign(@SpringQueryMap ChatQueryVO chatQueryVO);

}

